function createNode(){
    let metricFlow = MetricFlow("graph")

    const nodes = workflow["nodes"];
    for(let i=0;i<nodes.length;i++){
        let nodeData = {
            "id": "节点"+i,
            "title":{"name":nodes[i]["name"]},
            "data":[
                {"name": "节点类型:"+nodes[i]["type"]},
                {"name": "审批人:"+nodes[i]["assigner"]},
            ]
        };
        nodes[i]["nodeData"] = metricFlow.createNode(nodeData,10+200*i,200);
    }

    const jumpArray = workflow["jumpArray"];
    for(let i=0;i<jumpArray.length;i++){
        let node1 = getNode(jumpArray[i]["current"]);
        let node2 = getNode(jumpArray[i]["next"]);
        metricFlow.createLink(node1,node2);
    }
}

function getNode(name){
    const nodes = workflow["nodes"];
    for(let i=0;i<nodes.length;i++){
        if(nodes[i]["name"]===name){
            return nodes[i]["nodeData"];
        }
    }
    return null;
}